// 错误示例
class Test3 {
  test() {
    const s = { name: "ch", age: 18 };
    const params = JSON.stringify(s);
  }
}

// 正确示例
class Test4 {
  testGood() {
    try {
      const s = { name: "ch", age: 18 };
      console.log(JSON.stringify(s));
    } catch (error) {
      console.log("error is", error);
    }
  }
}
